package com.mf.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * <p>
 * 交易表
 * </p>
 *
 * @author mf
 * @since 2024-05-16
 */
@Data
@TableName("t_transactions")
public class Transactions {

        @TableId(value = "id", type = IdType.AUTO)
        private Integer id;

        /**
         * 买入价格
         */
        @Schema(description = "买入价格")
        private BigDecimal price;

        /**
         * 买入金额
         */
        @Schema(description = "买入金额")
        private BigDecimal amount;

        /**
         * 买入日期
         */
        @Schema(description = "买入日期")
        private String date;

        /**
         * 交易费用
         */
        @Schema(description = "交易费用")
        private BigDecimal cost;

        /**
         * 买入备注
         */
        @Schema(description = "买入备注")
        private String remark;

        /**
         * 交易情况 数据字段 pid 0
         */
        @Schema(description = "交易情况 数据字段 pid 0")
        private String type;

        /**
         * 交易类型 buy:买入,sell:卖出
         */
        @Schema(description = "交易类型 buy:买入,sell:卖出")
        private String  type2;

        /**
         * 股票代码
         */
        @Schema(description = "股票代码")
        private String dm;

        /**
         * 股票数量
         */
        @Schema(description = "股票数量")
        private int quantity;

        /**
         * 用户id
         */
        @Schema(description = "用户id")
        private Integer userId;

        private LocalDateTime createdTime;

        private LocalDateTime updateTime;
}